Response

Undocumented in source.

Constructors

this
this(ResponseHandler resp)
Undocumented in source.

Members

Functions

clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
delCookie
auto delCookie(string name)

delete Cookie

do403
void do403(string body_, string contentype)
Undocumented in source. Be warned that the author may not have intended to support it.
do404
void do404(string body_, string contentype)
Undocumented in source. Be warned that the author may not have intended to support it.
doError
void doError(ushort code, string body_, string contentype)
Undocumented in source. Be warned that the author may not have intended to support it.
done
void done()
Undocumented in source. Be warned that the author may not have intended to support it.
download
auto download(string filename, ubyte[] file, string content_type)

download file

html
auto html(string htmlString, string content_type)

render html string

json
auto json(JSONValue js)

return json value

json
auto json(string jsonString)

render json string value

plain
auto plain(string textString, string content_type)

render plain text string

redirect
void redirect(string url, bool is301)
Undocumented in source. Be warned that the author may not have intended to support it.
setContext
auto setContext(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
setContext
auto setContext(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
setCookie
auto setCookie(string name, string value, int expires, string path, string domain)

set Cookie

setHeader
auto setHeader(string key, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
setHeader
auto setHeader(HTTPHeaderCode key, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
setHttpError
void setHttpError(ushort code)
Undocumented in source. Be warned that the author may not have intended to support it.
setHttpStatusCode
auto setHttpStatusCode(ushort code)

set http status code eg. 404 200

Inherited Members

From ResponseBuilder

promise
ResponseBuilder promise(string url, string host)
Undocumented in source. Be warned that the author may not have intended to support it.
status
ResponseBuilder status(ushort code, string message)
Undocumented in source. Be warned that the author may not have intended to support it.
status
int status()

Get the status code for the response.

header
ResponseBuilder header(string name, T value)

Set a header on the Response.

header
ResponseBuilder header(HttpHeaderCode code, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
withHeaders
ResponseBuilder withHeaders(string[string] headers)

Add an array of headers to the response.

setBody
ResponseBuilder setBody(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
connectionClose
ResponseBuilder connectionClose()
Undocumented in source. Be warned that the author may not have intended to support it.
sendWithEOM
void sendWithEOM()
Undocumented in source. Be warned that the author may not have intended to support it.
send
void send()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
httpMessage
HttpMessage httpMessage [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
headers
HttpMessage headers [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
bodys
ByteBuffer!Mallocator* bodys [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
dataHandler
ResponseHandler dataHandler [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
dataHandler
ResponseHandler dataHandler [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
setResponseHandler
void setResponseHandler(ResponseHandler txn)
Undocumented in source. Be warned that the author may not have intended to support it.
_httpMessage
HttpMessage _httpMessage;
Undocumented in source.
_body
ByteBuffer!Mallocator _body;
Undocumented in source.
_txn
ResponseHandler _txn;
Undocumented in source.

Meta